﻿using SuiYuan.UI.Controls.Buttons;
using SuiYuan.UI.Controls.Notify;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace SuiYuan.Demo.Pages
{
    /// <summary>
    /// DialogPage.xaml 的交互逻辑
    /// </summary>
    public partial class DialogPage : UserControl
    {
        public DialogPage()
        {
            InitializeComponent();
        }

        private void NotifyOnClick(object sender, RoutedEventArgs e)
        {
            LayUIIconTextButton button = sender as LayUIIconTextButton;
            if (button == InfoNotify)
            {
                LayUINotify.ShowInfo("Info消息通知");
            }
            else if (button == SuccessNotify)
            {
                LayUINotify.ShowSuccess("Success消息通知");
            }
            else if (button == WarningNotify)
            {
                LayUINotify.ShowWarning("Warning消息通知");
            }
            else if (button == ErrorNotify)
            {
                LayUINotify.ShowError("Success消息通知");
            }
        }


        private void ConfirmMessageBoxOnClick(object sender, RoutedEventArgs e)
        {
            bool flag = LayUIConfirmMessageBox.Show("提示", "确定要关闭吗？");
            if (flag)
            {
                LayUIMessageBox.Show("提示", "您点击了确定按钮");
            }
            else
            {
                LayUIMessageBox.Show("提示", "您点击了取消按钮");
            }
        }
        private void MessageBoxOnClick(object sender, RoutedEventArgs e)
        {
            LayUIButton button = sender as LayUIButton;
            if (button == BaseMessageBox)
            {
                LayUIMessageBox.Show("基础提示", "内容");
            }
            else if (button == IconMessageBox1)
            {
                LayUIMessageBox.Show("图标提示1", "内容", 1);
            }
            else if (button == IconMessageBox2)
            {
                LayUIMessageBox.Show("图标提示2", "内容", 2);
            }
            else if (button == IconMessageBox3)
            {
                LayUIMessageBox.Show("图标提示3", "内容", 3);
            }
            else if (button == IconMessageBox4)
            {
                LayUIMessageBox.Show("图标提示4", "内容", 4);
            }
            else if (button == IconMessageBox5)
            {
                LayUIMessageBox.Show("图标提示5", "内容", 5);
            }
            else if (button == IconMessageBox6)
            {
                LayUIMessageBox.Show("图标提示6", "内容", 6);
            }
            else if (button == IconMessageBox7)
            {
                LayUIMessageBox.Show("图标提示7", "内容", 7);
            }
        }
        private void ToastOnClick(object sender, RoutedEventArgs e)
        {
            LayUIButton button = sender as LayUIButton;
            if (button == ToastTop)
            {
                LayUIToast.Show("HelloWorld", ToastLocation.Top);
            }
            else if (button == ToastLeft)
            {
                LayUIToast.Show("HelloWorld", ToastLocation.Left, 2000);
            }
            else if (button == ToastRight)
            {
                LayUIToast.Show("HelloWorld", ToastLocation.Right, 3000);
            }
            else if (button == ToastBottom)
            {
                LayUIToast.Show("HelloWorld", ToastLocation.Bottom, 4000);
            }
            else if (button == ToastCenter)
            {
                LayUIToast.Show("HelloWorld", ToastLocation.Center, 5000);
            }
        }
    }
}
